Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BPF] rework L2 overlay (vxlan) for performance #9965

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

tomastigera
Copy link
Contributor

Description

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

TBD

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@marvin-tigera marvin-tigera added this to the Calico v3.30.0 milestone Mar 11, 2025
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Mar 11, 2025
@tomastigera tomastigera force-pushed the tomas-bpf-vxlan-perf-fix branch 2 times, most recently from 9945acc to b929a89 Compare March 13, 2025 00:06
@tomastigera tomastigera added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact and removed release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Mar 13, 2025
@tomastigera tomastigera force-pushed the tomas-bpf-vxlan-perf-fix branch 2 times, most recently from a3fa044 to 8e90865 Compare March 20, 2025 18:59
It is sometimes handy to set explicitly what MTU should be used on a
certain route, for instance when a tunnel device is used for both ipv4/6
and the MTU is different each.
This is a stepping stone for ebpf to move to a single vxlan device for
both v4/6. We do not want to set MTU on the device, but host networked
processes will need to know what the MTU should be.
IT is a historical artefact and we should name it properly and leave the
name tunnel for a generic overlay.
We need to know that we are forwarding from and L2 overlay.
This allows us to use bpf_skb_set_tunnel_key for fast forwarding via the
vxlan overlay.
Also redirect from a pod to a local pod with bpf_redirect_peer when
possible.
Tunnel key is set at the vxlan device as that the the first place where
to set it.
We needed to propagate it to the bpf programs as it is no longer set on
the vxlan device itself.
The way the vxlan device is setup now makes having two device
unnecessary. In fact, two devices would not work well as they may get
packet meant for the other one. It does not really break things, but it
is a mess.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants